/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ufpr.inf.escel.test.brain;

import br.ufpr.inf.escel.brain.model.po.DadoTestePO;
import br.ufpr.inf.escel.brain.model.po.Metodos;
import br.ufpr.inf.escel.brain.model.po.Parametros;
import br.ufpr.inf.escel.brain.operators.OperadoresPO;
import org.junit.Before;
import org.junit.Test;

/**
 *
 * @author gustavo
 */
public class CruzamentoPO {

    private OperadoresPO oPO;
    private DadoTestePO dt1,  dt2;
    private String[] m1,  m2;
    private String[] p1,  p2;

    @Before
    public void init() {
        oPO = new OperadoresPO();

        m1 = new String[2];
//        m1[0] = "$q.swap(II)";
        m1[0] = "$q.size()";
        m1[1] = "$q.equals(Object)";

        p1 = new String[1];
//        p1[0] = "-5789";
//        p1[1] = "457";
        p1[0] = "r";

        Metodos met1 = new Metodos(m1);
        Parametros param1 = new Parametros(p1);
        dt1 = new DadoTestePO(met1, param1);

        m2 = new String[2];
//        m2[0] = "$j.display()";
        m2[0] = "$j.swap(II)";
        m2[1] = "$j.get(I)";

        p2 = new String[3];
        p2[0] = "-1346789";
        p2[1] = "-12458";
        p2[2] = "134789";

        Metodos met2 = new Metodos(m2);
        Parametros param2 = new Parametros(p2);
        dt2 = new DadoTestePO(met2, param2);
    }

    @Test
    public void testCruzamento() {
        System.out.println(oPO.cruzar(dt1, dt2));
    }
}
